

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Jose Luis Orta
 */
public class Progreso {
    private double x;
    private double n;
    private boolean fin;
    
    public Progreso(){
        x=0;
        n=1;
        fin=false;
    }
    /**
     * @return the x
     */
    public double getX() {

        return x;
    }

    /**
     * @param x the x to set
     */
    public void setX(double x) {
        if (x>this.n){
            this.x=n;
        } else {
            this.x = x;
        }
    }

    /**
     * @return the y
     */
    public double getN() {
        return n;
    }

    /**
     * @param y the y to set
     */
    public void setN(double n) {
        if (n==0){
            this.x=0;
            this.n=1;
        } else {
            this.n = n;
        }

    }
    public double getPc(){
        return (x/n)*100;
    }
    public void setFin(boolean fin){
        this.fin=fin;
    }
    public boolean isFin(){
        return fin;
    }
    
}
